package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by admin on 2017-07-26.
 */

public class MessageListApi extends BaseApi {
    MessageListReq req;
    public MessageListApi(String member_id){
        req=new MessageListReq(member_id);
    }
    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).getMessage(requestBody);
    }
    private class MessageListReq{
        private String member_id;
        private String push_plat;//1-安卓 0-ios

        public MessageListReq(String member_id) {
            super();
            this.push_plat="1";
            this.member_id=member_id;
        }


    }
}
